package org.gdstash.ui.table;

import org.gdstash.item.GDItem;
import org.gdstash.util.GDMsgFormatter;

import javax.swing.*;

public class GDItemSetCollectionRow {
    public static final Class[] COLUMN_CLASSES;
    public static String[] columnNames;
    public GDItemSetInfo set;
    public GDItem.LabelInfo setName;
    public GDItem.LabelInfo setLevel;
    public GDItem.LabelInfo setRarity;
    public int level;
    public int rarity;
    public ImageIcon iconItem1;
    public int scItem1;
    public int hcItem1;
    public boolean blueprint1;
    public ImageIcon iconItem2;
    public int scItem2;
    public int hcItem2;
    public boolean blueprint2;
    public ImageIcon iconItem3;
    public int scItem3;
    public int hcItem3;
    public boolean blueprint3;
    public ImageIcon iconItem4;
    public int scItem4;
    public int hcItem4;
    public boolean blueprint4;
    public ImageIcon iconItem5;
    public int scItem5;
    public int hcItem5;
    public boolean blueprint5;
    public ImageIcon iconItem6;
    public int scItem6;
    public int hcItem6;
    public boolean blueprint6;

    public static void updateColumnNames() {
        if (GDItemSetCollectionRow.columnNames == null) {
            GDItemSetCollectionRow.columnNames = new String[9];
        }
        GDItemSetCollectionRow.columnNames[0] = GDMsgFormatter.getString(GDMsgFormatter.rbUI, "TXT_SET");
        GDItemSetCollectionRow.columnNames[1] = GDMsgFormatter.getString(GDMsgFormatter.rbUI, "TXT_LEVEL");
        GDItemSetCollectionRow.columnNames[2] = GDMsgFormatter.getString(GDMsgFormatter.rbUI, "TXT_RARITY");
        GDItemSetCollectionRow.columnNames[3] = "";
        GDItemSetCollectionRow.columnNames[4] = "";
        GDItemSetCollectionRow.columnNames[5] = "";
        GDItemSetCollectionRow.columnNames[6] = "";
        GDItemSetCollectionRow.columnNames[7] = "";
        GDItemSetCollectionRow.columnNames[8] = "";
    }

    static {
        COLUMN_CLASSES = new Class[]{String.class, String.class, String.class, Icon.class, Icon.class, Icon.class, Icon.class, Icon.class, Icon.class};
        GDItemSetCollectionRow.columnNames = null;
        updateColumnNames();
    }
}
